package com.cloudlead.plugin.scheduler.query;

import static com.mysema.query.types.PathMetadataFactory.*;

import com.cloudlead.plugin.scheduler.entity.EScheduleJob;
import com.cloudlead.plugin.scheduler.entity.EScheduleJobInstance;


import com.mysema.query.types.path.*;

import com.mysema.query.types.PathMetadata;
import javax.annotation.Generated;
import com.mysema.query.types.Path;

import com.mysema.query.sql.ColumnMetadata;
import java.sql.Types;

import com.mysema.query.sql.*;

import com.cloudlead.common.lang.annotation.Label;


/**
 * QScheduleJobInstance is a Querydsl query type for EScheduleJobInstance
 */
@Label("计划任务实例查询")
@Generated("com.cloudlead.utils.persistence.codegen.serializer.SimpleMetaDataSerializer")
public class QScheduleJobInstance extends RelationalPathBase<EScheduleJobInstance> {

    private static final long serialVersionUID = 1406283030;

    public static final QScheduleJobInstance scheduleJobInstance = new QScheduleJobInstance("schedule_job_instance");

    public class PrimaryKeys {

        public final PrimaryKey<EScheduleJobInstance> primary = createPrimaryKey(id);

    }

    public class ForeignKeys {

        public final ForeignKey<EScheduleJob> jobInstanceJob1Fk = createForeignKey(jobId, "id");

    }

    public final StringPath id = createString("id");

    public final StringPath jobId = createString("jobId");

    public final NumberPath<Long> startTime = createNumber("startTime", Long.class);

    public final StringPath status = createString("status");

    public final NumberPath<Long> stopTime = createNumber("stopTime", Long.class);

    public final PrimaryKeys pk = new PrimaryKeys();

    public final ForeignKeys fk = new ForeignKeys();

    public QScheduleJobInstance(String variable) {
        super(EScheduleJobInstance.class, forVariable(variable), "null", "schedule_job_instance");
        addMetadata();
    }

    public QScheduleJobInstance(String variable, String schema, String table) {
        super(EScheduleJobInstance.class, forVariable(variable), schema, table);
        addMetadata();
    }

    public QScheduleJobInstance(Path<? extends EScheduleJobInstance> path) {
        super(path.getType(), path.getMetadata(), "null", "schedule_job_instance");
        addMetadata();
    }

    public QScheduleJobInstance(PathMetadata<?> metadata) {
        super(EScheduleJobInstance.class, metadata, "null", "schedule_job_instance");
        addMetadata();
    }

    public void addMetadata() {
        addMetadata(id, ColumnMetadata.named("id").withIndex(1).ofType(Types.CHAR).withSize(24).notNull());
        addMetadata(jobId, ColumnMetadata.named("job_id").withIndex(5).ofType(Types.CHAR).withSize(24).notNull());
        addMetadata(startTime, ColumnMetadata.named("start_time").withIndex(3).ofType(Types.BIGINT).withSize(19));
        addMetadata(status, ColumnMetadata.named("status").withIndex(2).ofType(Types.CHAR).withSize(10).notNull());
        addMetadata(stopTime, ColumnMetadata.named("stop_time").withIndex(4).ofType(Types.BIGINT).withSize(19));
    }

}

